//
//  YHCountDownButton.h
//  YHBaseProject
//
//  Created by 刘宇航 on 2018/5/1.
//  Copyright © 2018 lyh. All rights reserved.

#import <UIKit/UIKit.h>
@class YHCountDownButton;

typedef NSString * (^CountDownChanging)(YHCountDownButton *countDownButton, NSUInteger second);
typedef NSString * (^CountDownFinished)(YHCountDownButton *countDownButton, NSUInteger second);
typedef void (^TouchedCountDownButtonHandler)(YHCountDownButton *countDownButton, NSInteger tag);


@interface YHCountDownButton : UIButton

@property (nonatomic, strong) id userInfo;

/// 倒计时按钮点击回调
- (void)countDownButtonHandler:(TouchedCountDownButtonHandler)touchedCountDownButtonHandler;
/// 倒计时时间改变回调
- (void)countDownChanging:(CountDownChanging)countDownChanging;
/// 倒计时结束回调
- (void)countDownFinished:(CountDownFinished)countDownFinished;
/// 开始倒计时
- (void)startCountDownWithSecond:(NSUInteger)second;
/// 停止倒计时
- (void)stopCountDown;

@end
